home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000146_icon-group-sender_Mon Nov 25 07:57:00 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id gAPEtXI03573
  4.     for icon-group-addresses; Mon, 25 Nov 2002 07:55:33 -0700 (MST)
  5. Message-Id: <200211251455.gAPEtXI03573@baskerville.CS.Arizona.EDU>
  6. From: "Michael Borek" <MichaelBorek@eastlink.ca>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: delete( L, i )
  9. X-Priority: 3
  10. X-MSMail-Priority: Normal
  11. X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
  12. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
  13. Date: Sun, 24 Nov 2002 20:06:29 -0400
  14. To: icon-group@cs.arizona.edu
  15. Errors-To: icon-group-errors@cs.arizona.edu
  16. Status: RO
  17.  
  18. "ernobe" <ernobe@msn.com> wrote in message
  19. news:MPG.184a61341eeee86c98999d@news.CIS.DFN.DE...
  20. >
  21. > I got an e-mail from Clint Jeffery in which he says that the delete( L,
  22. i )
  23. > function is not part of Icon, but of Unicon.  Instead of bothering him
  24. with
  25. [SNIP]
  26.  
  27. It is documented as producing error 122 X not set or table.
  28.  
  29. however, the following occur:
  30.  
  31.   delete(L, i) destructively deletes the ith member of L.  Fails if i > *L
  32.   key(L) generates the indices ("keys") of L.  Documented as producing error
  33. 124 T not table.
  34.   insert(L, i, x) replaces the ith member of L with x.  Fails if i > *L
  35.  
  36.   member(L, x) produces error 122
  37.  
  38.  
  39. --
  40. |***| Michael Borek   "Death before Dishonour; Beer before Lunch"
  41. |:. | Independent Software Contractor
  42. |. :| http://users.eastlink.ca/~borekking/professionalhome.html
  43. \___/
  44.  
  45.  
  46. >
  47. > procedure main()
  48. > me := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
  49. > ab := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
  50. > every 1 to 2 do
  51. > every delete( ab, !me )
  52. > every writes( " ", string( ab[ 1 to 10 ] ) )
  53. > end
  54. >
  55. >
  56. > This program prints this:
  57. >
  58. > 4 8
  59. >
  60. > Which is what it should if delete(L, i) does work in Icon.
  61. > --
  62. > my esoteric links:
  63. > http://www.costarricense.cr/pagina/ernobe/
  64.  
  65.  
  66.  
  67.